.chat-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.chat-header {
  text-align: center;
  margin-bottom: 2rem;
}

.chat-header h1 {
  color: #333;
  margin-bottom: 0.5rem;
}

.chat-header p {
  color: #666;
}

.chat-window {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.chat-messages {
  height: 500px;
  overflow-y: auto;
  padding: 1rem;
}

.message {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #007bff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.user-message .avatar {
  background: #28a745;
}

.message-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 10px;
  max-width: 70%;
  white-space: pre-wrap;
  line-height: 1.5;
}

.user-message .message-content {
  background: #e3f2fd;
}

.ai-message .message-content {
  background: #f8f9fa;
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid #eee;
}

#userInput {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 1rem;
  resize: none;
}

.button-group {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.primary-button,
.secondary-button {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.primary-button {
  background: #007bff;
  color: white;
}

.secondary-button {
  background: #6c757d;
  color: white;
}

.primary-button:hover {
  background: #0056b3;
}

.secondary-button:hover {
  background: #5a6268;
}

/* 加载动画样式 */
.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background-color: #007bff;
  border-radius: 50%;
  animation: loading 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}